let bannerInstance

export default {
  _setBannerContainerInstance(instance) {
    console.log(instance)
    bannerInstance = instance
  },
  // 获取banner容器实例
  getContainerInstance() {
    return bannerInstance
  },
  // 获取banner实例
  getInstance() {
    if (this.getContainerInstance()) {
      try {
        return this.getContainerInstance().$refs.bannerCom.$refs.codeCom
      } catch (e) {
        console.error(e)
        return null
      }
    }
    return null
  }
}
